<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页左侧导航</title>
<jsp:include page="./lib.jsp"></jsp:include>
<link rel="stylesheet" href="${pageContext.request.contextPath}/ztree/css/demo.css" type="text/css"/>
<link rel="stylesheet" href="${pageContext.request.contextPath}/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/ztree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/ztree/js/jquery.ztree.exhide.js"></script>
</head>

<body >
	<!-- <div class="down-main">
		  <div class="left-main left-full">
		    <div class="subNavBox"> -->
			     <div class="zTreeDemoBackground left"  id="authority" style="width: auto" >  
					<ul id="user_tree" class="ztree"  style="height: 520px"></ul>  
			     </div>
		     
	  		<!--  </div>
	  	  </div> -->
		  <div class="right-product right-full">
		   	<iframe id="iframe-page-content" src="" width="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
		  </div>
	<!-- </div> -->
<script type="text/javascript">
$(function() {
	var height=document.documentElement.clientHeight-50;
	document.getElementById('iframe-page-content').style.height=height+'px';
});

var zTree;  
$(document).ready(function(){
	var set = {
		    view: {  
		        dblClickExpand: true,//双击节点时，是否自动展开父节点的标识  
		        showLine: true,//是否显示节点之间的连线  
		        fontCss:{'color':'blue','font-weight':'bold'},//字体样式函数  
		        selectedMulti: true //设置是否允许同时选中多个节点  
		    },  
			check:{  
		        chkStyle: "checkbox",
		        enable: true  
		    },  
			   data: {  
			        simpleData: {//简单数据模式  
			            enable:true,  
			            idKey: "id",  
			            pIdKey: "pid",  
			            rootPId: ""  
			        }  
			    },
			    callback: {  
			        onClick: function(e,treeId, treeNode) {
			        var url=sy.bp()+treeNode.src;
			        $("#iframe-page-content").attr('src',url);
			        },
			        onDblClick:function (){
			        }
			    }
	};

			t = $.fn.zTree.init($("#user_tree"), set, zNodes);
	/* $.ajax({
		url:sy.bp()+"/ztree/ztree.action",
		type:"post",
		dataType:"json",
		success:function (zNodes){
		}
	}); */
});
 
</script>
</body>
</html>
